<!DOCTYPE html>
<%-- <%@ taglib uri="controls" prefix="ef"%> --%>
<html>
<head>
<!--Basic Styles-->
<link href="${ctx}framework/miniui/themes/material/miniui.css" rel="stylesheet" />
<link href="${ctx}framework/css/app.min.1.css" rel="stylesheet" type="text/css" />
<link href="${ctx}framework/css/app.min.2.css" rel="stylesheet" type="text/css" />
<script src="${ctx}framework/main.js" type="text/javascript"></script>
<style>
	html, html body {padding:0;border:0;margin:0;width:100%;height:100%;overflow:hidden;font-family:Verdana;font-size:12px;line-height:22px;}
</style>
<script>
var id = "${ID}";
var lang = "${User.Language}";
/* Efast.Page.onReady(function(){
	 setValues();
	 if(parent.window.getDom(id).disabled){
		Efast.getByName("Values").each(function(ele){$(ele).disable();});
	 	z.Node.hide(dialogOpener.$D.okButton);
	 }
}); */

function setValues(){
	var str = parent.window.$V(id+"_I18N");
	var targetValue = parent.window.$V(id);
 	str = unescape(str);
	if(str.startsWith("${")&&str.endsWith("}")){
		str = "";//说明没有值
	}
	if(str.startsWith("@Lang\n")){
		var arr = str.substring(6).split(/\n/);
		for(var i=0;i<arr.length;i++){
			var k = arr[i];
			if(k.indexOf("=")<1){
				continue;
			}
			var v = k.substring(k.indexOf("=")+1);
			k = k.substring(0,k.indexOf("="));
			if(k==lang){
				v = targetValue;//反映最新的修改情况
			}
			$S(id+"_"+k,v);
		}
	}else{
 		$S(id+"_"+lang,targetValue);
	}	
}

function getLangString(){
	var arr = Efast.getByName("Values");
	var r = ["@Lang"];
	for(var i=0;i<arr.length;i++){
		var k = arr[i].id;
		if(k.length<=id.length){
			continue;
		}
		k = k.substring(id.length+1);
		r.push(k+"="+arr[i].value);
	}
	return escape(r.join("\n"));
}

function getCurrentLangValue(){
	return Efast.$V(id+"_"+lang);	
}
</script>
</head>
<body>
<div id="tabs1" class="mini-tabs" activeIndex="0" style="width:100%;height:100%;">
	<ef:list method="#com.efastsoft.framework.i18n.LangButtonUI.bindLanguageList">
		<div title="${Name}">
			
			<textarea id="lang_${Key}" name="Values" class="inputText" style="height:100%;width:100%;padding:0;border:none; display:block;resize:none"></textarea>
			
		</div>
	</ef:list>
</div>
</body>
</html>
